import config from 'config'
import httpFetch from 'share/httpFetch'

export default {

  //查询邮件模版列表
  getDeptGroupByOptions(params){
    return httpFetch.get(`${config.baseUrl}/api/mail/template`,params)
  },


  //根据id查询邮件模版详情
  getMailTemplateDetail(id){
    return httpFetch.get(`${config.baseUrl}/api/mail/template/${id}`)
  },

  //新增邮件打印消息
  addOrUpdateMailTemplate(params){
    return httpFetch.post(`${config.baseUrl}/api/mail/template`,params)
  },

  //查看审批邮件模版列表
  getMailTemplate(params){
    return httpFetch.get(`${config.baseUrl}/api/mail/template/approval/list`, params)
  },

  //新增或编辑邮件审批模版
  addEditTemplate(params){
    return httpFetch.post(`${config.baseUrl}/api/mail/template/upsert/approval`, params)
  }
}
